package com.gxitsky;

import com.gxitsky.common.listener.RequestListener;
import com.gxitsky.utils.UidUtil;
import org.slf4j.MDC;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.SpringVersion;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@SpringBootApplication
public class SpringbootDemoApplication {

    public static void main(String[] args) {
        MDC.put(RequestListener.LOG_ID, UidUtil.getUID().toString());
        SpringApplication.run(SpringbootDemoApplication.class, args);
        String version = SpringVersion.getVersion();
        String bootVersion = SpringBootVersion.getVersion();
        System.out.println("Spring Version: " + version);
        System.out.println("Spring Boot Version: " + bootVersion);
    }

}
